<!-- Bread crumb is created dynamically -->

<!--
	The ID "widget-grid" will start to initialize all widgets below 
	You do not need to use widgets if you dont want to. Simply remove 
	the <section></section>
and you can use wells or panels instead 
	-->
<!-- widget grid -->
<section id="widget-grid" class="">

    <!-- row -->
    <div class="row">

        <!-- NEW WIDGET START -->
        <article class="col-xs-12 col-sm-12 col-md-12 col-lg-12">

            <!-- Widget ID (each widget will need unique ID)-->
           	<div class="jarviswidget jarviswidget-color-blueLight" id="wid-id-0" data-widget-sortable="true" data-widget-colorbutton="false" data-widget-editbutton="false" data-widget-togglebutton="false" data-widget-deletebutton="false">
                <!-- widget options:
					usage: <div class="jarviswidget" id="wid-id-0" data-widget-editbutton="false">
			data-widget-colorbutton="false"	
					data-widget-editbutton="false"
					data-widget-togglebutton="false"
					data-widget-deletebutton="false"
					data-widget-fullscreenbutton="false"
					data-widget-custombutton="false"
					data-widget-collapsed="true" 
					data-widget-sortable="false"
					
				-->
                <header>
                    <span class="widget-icon"> <i class="fa  fa-puzzle-piece"></i>
                    </span>
                    <h2>接口文档</h2>

                </header>

                <!-- widget div-->
                <div>

                    <!-- widget edit box -->
                    <div class="jarviswidget-editbox">
                        <!-- This area used as dropdown edit box -->
                        <!-- Normally there would be an input text box here to change widget title. 
							Use this area only if plan to let users change widget title -->
                    </div>
                    <!-- end widget edit box -->

                    <!-- widget content -->
                    <div class="widget-body">
                        <div class="well well-sm">
                            <h3 class="text-primary">班线信息同步接口</h3>
                            <p class="alert alert-info">外部系统可以通过该接口向G7平台发送班线信息，G7平台将接口获取的班线信息存入系统。</p>
                            <p>
                                <strong><i class="fa fa-info fa-fw text-danger"></i>
                                    接口方法名：
                                </strong>
                                <i class="text-success">ips2.postevent.syncline</i>
                            </p>
                            <p>
                                <strong><i class="fa fa-info fa-fw text-danger"></i>
                                    接口参数：
                                </strong>
                                （系统级参数略）
                            </p>
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>参数名称</th>
                                        <th>类型</th>
                                        <th>必选项</th>
                                        <th>取值描述</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr class="warning">
                                        <td>lineid</td>
                                        <td>String</td>
                                        <td>是</td>
                                        <td>班线唯一识别标志</td>
                                    </tr>
                                    <tr>
                                        <td>usetype</td>
                                        <td>Int</td>
                                        <td>否</td>
                                        <td>班线类型(1:干线,3:支线)(默认1)</td>
                                    </tr>
                                    <tr>
                                        <td>orgnum</td>
                                        <td>String</td>
                                        <td>否</td>
                                        <td>班线所属机构代码(如不传或系统中不存在则默认取顶级机构)</td>
                                    </tr>
                                    <tr class="warning">
                                        <td>startsiteid</td>
                                        <td>String</td>
                                        <td>是</td>
                                        <td>出发站点ID</td>
                                    </tr>
                                    <tr class="warning">
                                        <td>endsiteid</td>
                                        <td>String</td>
                                        <td>是</td>
                                        <td>到达站点ID</td>
                                    </tr>
                                    <tr>
                                        <td>name</td>
                                        <td>String</td>
                                        <td>否</td>
                                        <td>线路名称(为空时名称默认为出发站到达站组合)</td>
                                    </tr>
                                    <tr>
                                        <td>mile</td>
                                        <td>Float</td>
                                        <td>否</td>
                                        <td>线路里程(km)</td>
                                    </tr>
                                    <tr>
                                        <td>runtime</td>
                                        <td>Float</td>
                                        <td>否</td>
                                        <td>运行时间(分)(当有途径站信息时必填)</td>
                                    </tr>
                                    <tr>
                                        <td>runtime</td>
                                        <td>Float</td>
                                        <td>否</td>
                                        <td>运行时间(分)(当有途径站信息时必填)</td>
                                    </tr>
                                    <tr class="warning">
                                        <td>isdelete</td>
                                        <td>Int</td>
                                        <td>是</td>
                                        <td>是否删除(1:删除,0:添加或修改)(删除时只需传lineid)</td>
                                    </tr>
                                    <tr>
                                        <td>passinfo</td>
                                        <td>Object</td>
                                        <td>否</td>
                                        <td>途经站信息(没有途经站可不传或为空)</td>
                                    </tr>
                                </tbody>
                            </table>
                            <p><strong>
                                <i class="fa-fw fa fa-anchor text-danger"></i>
                                passinfo 参数明细</strong></p>
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>参数名称</th>
                                        <th>类型</th>
                                        <th>必选项</th>
                                        <th>取值描述</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr class="warning">
                                        <td>passsiteid</td>
                                        <td>String</td>
                                        <td>是</td>
                                        <td>途经点ID</td>
                                    </tr>
                                    <tr>
                                        <td>passdistance</td>
                                        <td>String</td>
                                        <td>否</td>
                                        <td>上一站到本站距离(千米)</td>
                                    </tr>
                                    <tr class="warning">
                                        <td>passruntime</td>
                                        <td>Int</td>
                                        <td>是</td>
                                        <td>上一站到本站运行时间(分)</td>
                                    </tr>
                                    <tr class="warning">
                                        <td>passstoptime</td>
                                        <td>Int</td>
                                        <td>是</td>
                                        <td>本站计划停留时间(分)</td>
                                    </tr>
                                    <tr class="warning">
                                        <td>passsort</td>
                                        <td>Int</td>
                                        <td>是</td>
                                        <td>途经站顺序(从1开始)</td>
                                    </tr>                                                                     
                                </tbody>
                            </table>
                            <p>
                                <strong><i class="fa fa-info fa-fw text-danger"></i>
                                    接口示例：
                                </strong>略
                            </p>                             
                            <p>
                                <strong><i class="fa fa-info fa-fw text-danger"></i>
                                    返回数据说明：
                                </strong>
                            </p> 
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>数据项名称</th>
                                        <th>类型</th>
                                        <th>描述</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>totalCount</td>
                                        <td>Int</td>
                                        <td>处理记录条数</td>
                                    </tr>
                                    <tr>
                                        <td>successCount</td>
                                        <td>Int</td>
                                        <td>成功处理记录条数</td>
                                    </tr>
                                    <tr>
                                        <td>result</td>
                                        <td>Object</td>
                                        <td>处理失败记录信息</td>
                                    </tr>
                                </tbody>
                            </table>  
                            <p><strong>
                                <i class="fa-fw fa fa-anchor text-danger"></i>
                                result 参数明细</strong></p>
                            <table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>数据项名称</th>
                                        <th>类型</th>
                                        <th>描述</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>id</td>
                                        <td>String</td>
                                        <td>站点编号(对应入参lineid)</td>
                                    </tr>
                                    <tr>
                                        <td>status</td>
                                        <td>String</td>
                                        <td>失败类型(代码)</td>
                                    </tr>
                                    <tr>
                                        <td>message</td>
                                        <td>String</td>
                                        <td>失败类型(名称)</td>
                                    </tr>
                                </tbody>
                            </table>                                                                                              
                            <p><strong><i class="fa fa-info fa-fw text-danger"></i>返回结果示例：</strong></p>   
                            <pre>
                            	<code class="html">
{
	"code": 0,
	"message": "",
	"data": {
		“totalCount”: “22”,			//总共处理记录条数
		“successCount”: “20”,			//成功处理记录条数
		“result”:[				//失败记录明细
			{
			“id”: “L001”,			//站点编号
			“status”: “201”,		//失败类型(代码)
			“message”: “缺少必传字段”,	//失败类型(名称)
		},
			{
			“id”: “L002”,			//站点编号
			“status”: “203”,		//失败类型(代码)
			“message”: “出发站不存在”,	//失败类型(名称)
		},
			略……
			],
	}
}
                            	</code>
                            </pre>   
                            <p><strong><i class="fa fa-info fa-fw text-danger"></i>异常说明：</strong></p>   
							<table class="table table-bordered table-hover">
                                <thead>
                                    <tr>
                                        <th>异常编码</th>
                                        <th>异常原因</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>status=201</td>
                                        <td>缺少必填字段(参考入参标准)</td>
                                    </tr>
                                    <tr>
                                        <td>status=203</td>
                                        <td>入参中出发站或者到达站或途经站在系统中不存在(参考返回值异常信息)</td>
                                    </tr>
                                    <tr>
                                        <td>status=208</td>
                                        <td>删除班线失败(数据库操作不成功，可尝试重新调用接口)</td>
                                    </tr>
                                    <tr>
                                        <td>status=209</td>
                                        <td>编辑班线失败(数据库操作不成功，可尝试重新调用接口)</td>
                                    </tr>
                                    <tr>
                                        <td>status=210</td>
                                        <td>添加班线失败(数据库操作不成功，可尝试重新调用接口)</td>
                                    </tr>                                                                        
                                </tbody>
                            </table>   
                                         
                        </div>
                    </div>
                    <!-- end widget content -->

                </div>
                <!-- end widget div -->

            </div>
            <!-- end widget -->

        </article>
        <!-- WIDGET END -->

    </div>

    <!-- end row -->

    <!-- row -->

    <div class="row">

        <!-- a blank row to get started -->

    </div>

    <!-- end row -->

</section>
<!-- end widget grid -->

<script type="text/javascript">
/* DO NOT REMOVE : GLOBAL FUNCTIONS!
 *
 * pageSetUp(); WILL CALL THE FOLLOWING FUNCTIONS
 *
 * // activate tooltips
 * $("[rel=tooltip]").tooltip();
 *
 * // activate popovers
 * $("[rel=popover]").popover();
 *
 * // activate popovers with hover states
 * $("[rel=popover-hover]").popover({ trigger: "hover" });
 *
 * // activate inline charts
 * runAllCharts();
 *
 * // setup widgets
 * setup_widgets_desktop();
 *
 * //setup nav height (dynamic)
 * nav_page_height();
 *
 * // run form elements
 * runAllForms();
 *
 ********************************
 *
 * pageSetUp() is needed whenever you load a page.
 * It initializes and checks for all basic elements of the page
 * and makes rendering easier.
 *
 */

pageSetUp();

/*
 * ALL PAGE RELATED SCRIPTS CAN GO BELOW HERE
 * eg alert("my home function");
 */
</script>
